package com.bjsj.pro.base;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import java.util.List;

/**
 * Created by Nevermore on 2017/5/3.
 */

public class BasePagerAdapter extends FragmentPagerAdapter
{
    private List<String> mTitles;
    private List<Fragment> mFragments;

    public BasePagerAdapter(FragmentManager fm, List<String> titles, List<Fragment> mFragment)
    {
        super(fm);
        mTitles = titles;
        mFragments=mFragment;
    }
    @Override
    public int getCount()
    {
        return mFragments.size();
    }

    @Override
    public CharSequence getPageTitle(int position)
    {
        return mTitles.get(position);
    }

    @Override
    public Fragment getItem(int position)
    {
        return mFragments.get(position);
    }


}
